cbuffer ConstantBuffer
{
    float4x4 matFinal;
}

Texture2D Texture;
SamplerState ss;

struct VOut
{
    float4 position : SV_POSITION;
    float4 color : COLOR;
	float2 texcoord : TEXCOORD;
};

VOut VShader(float4 position : POSITION, float4 color : COLOR, float2 texcoord : TEXCOORD)
{
    VOut output;

    output.position = mul(matFinal, position);    // transform the vertex from 3D to 2D
    output.color = 1.0f;

	output.texcoord = texcoord;

    return output;
}

VOut VShaderMenu(float4 position : POSITION, float4 color: COLOR, float2 texcoord : TEXCOORD)
{
	VOut output;
	
	output.position = position;
	output.color = color;

	output.texcoord = texcoord;

	return output;
}


float4 PShader(float4 position : SV_POSITION, float4 color : COLOR, float2 texcoord : TEXCOORD) : SV_TARGET
{
	float4 Ocolor;
    Ocolor = color * Texture.Sample(ss, texcoord);

	return Ocolor;
}